public class 练习2 {
    public static void main(String[] args) {
        Dog dog = new Dog();
        dog.name = "陈八方";
        dog.age = 2;
        dog.weight = 50;
        System.out.println(dog.say());
    }
}
class Dog{
    String name;
    int age;
    double weight;
    public String say(){
        String say = "我叫" + name + ","+ "我今年" + age + "岁了," + "我有" + weight + "斤重。";
                return say;
    }
}
